{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hausdorff distance test: 3.789821310822265\n",
      "Weighted Hausdorff distance test: 2.571487715500775\n"
     ]
    }
   ],
   "source": [
    "from scipy.spatial.distance  import directed_hausdorff, pdist\n",
    "\n",
    "import numpy as np\n",
    "from hausdorff import hausdorff, weighted_hausdorff\n",
    "\n",
    "# two random 2D arrays (second dimension must match)\n",
    "X = np.random.random((1000,100))\n",
    "Y = np.random.random((5000,100))\n",
    "\n",
    "# 1D weights array\n",
    "w = np.random.random(100)\n",
    "\n",
    "print(\"Hausdorff distance test: {0}\".format(hausdorff(X, Y)))\n",
    "print(\"Weighted Hausdorff distance test: {0}\".format(weighted_hausdorff(X, Y, w)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Global TF Kernel (Python 3)",
   "language": "python",
   "name": "global-tf-python-3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
